-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
会話一覧の最新化 #59
会話一覧の最新化 #59
Conversation
post: ( | ||
id: string, | ||
content: string, | ||
mutateListChat: KeyedMutator<ListChatsResponse> | ||
) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZsutandとSWRの相性問題があり、Zsutandの中でSWRを実行するとエラーになってしまうので、Mutate関数を渡す実装にしました。
<Markdown> | ||
{message.content + | ||
`${ | ||
loading && | ||
idx === messages.length - 1 && | ||
messages[idx].content !== '' | ||
? '▍' | ||
: '' | ||
}`} | ||
</Markdown> | ||
{loading && | ||
message.role === 'assistant' && | ||
idx === messages.length - 1 && ( | ||
<div className="animate-pulse text-2xl text-gray-700"> | ||
<PiDotsThree /> | ||
</div> | ||
idx === messages.length - 1 && | ||
messages[idx].content === '' && ( | ||
<div className="animate-pulse text-gray-700">▍</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading表示の修正を入れ忘れていたので、こちらも修正しました。
const getLabelByPath = (path: string) => { | ||
const getLabelByPath = (_path: string) => { | ||
// MEMO: /chat/:chatId の path の場合に件名が表示されないため、以下の実装としている | ||
const path = '/' + _path.split('/')[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これそうなんすよねぇ〜自分も気になってました。タイトルが出せると良いのにと。Issue 化しておきます!
Issue #, if available:
#41
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.